Zum Hauptinhalt springen
Version: 5.0

TimePunch Work Model Service

Der Work Model Service bietet Zugriff auf die in TimePunch hinterlegten Arbeitszeitmodelle.

AddWorkModel

Diese Methode wird dazu verwendet bei einem Mitarbeiter ein neues Arbeitszeitmodell hinzuzufügen.

void AddWorkModel(  
out TpFault fault,
TpAuthentication authentication,
WorkModelDto workModel);
Needed PermissionworkdayModels@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
workModelThe workmodel that shall be added to the users workmodels

GetWorkDayModels

Mit Hilfe dieser Methode werden die Arbeitszeitmodelle pro Tag für den angegebenen Zeitraum abgerufen.

List<WorkdayDto> GetWorkDayModels(  
out TpFault fault,
TpAuthentication authentication,
DateTime startDate,
DateTime endDate);
Needed PermissionworkdayModels@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userSearchInformation that are used to search the TimePunch profiles
startDateFirst date for that the workday model shall be retrieved.
endDateLast date for that the workday model shall be retrieved.
Return valueList of all workday models for the given authentication.

GetWorkModel

Diese Methode liefert das Arbeitszeitmodell für das übergebene Datum zurück.

WorkModelDto GetWorkModel(  
out TpFault fault,
TpAuthentication authentication,
DateTime date,
Guid? userId = null);
Needed PermissionworkdayModels@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
dateDate used to evaluate the valid work model
userIdUser Id for whom the work model shall be received. Or NULL to evaluate it for the current user.
Return valueWork model that is valid for the given date.

GetWorkModels

Diese Methode liefert alle Arbeitszeitmodelle für den übergebenen Mitarbeiter zurück.

List<WorkModelDto> GetWorkModels(  
out TpFault fault,
TpAuthentication authentication);
Needed PermissionworkdayModels@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
Return valueList of all work models for the authenticated identity

SaveWorkModels

Diese Methode speichert die Arbeitszeitmodelle für den übergebenen Mitarbeiter. Es ist wichtig, dass die Liste vollständig ist, da fehlende Arbeitszeitmodelle im Mitarbeiterprofil entfernt werden.

void SaveWorkModels(  
out TpFault fault,
TpAuthentication authentication,
List<WorkModelDto> workModels);
Needed PermissionworkdayModels@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
workModelsList of all work models for the authenticated identity

SetGlobalCoreTimes

Diese Methode wird zum Setzen der globalen Kernarbeitszeit in TimePunch verwendet.

void SetGlobalCoreTime(  
out TpFault fault,
TpAuthentication authentication,
List<WorkModelDto> workModels);
Needed Permissioncore@administrate
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
CoreTimeDtoContains the begin and the end of the core time